local skel = fk.CreateSkill {
  name = "gai__zaiting",
  tags = { Skill.Lord, Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["gai__zaiting"] = "灾庭",
  [":gai__zaiting"] = "主公技，锁定技，晋势力角色出牌阶段使用【杀】次数上限+1，你使用【杀】或晋势力角色对你使用【杀】无距离限制。",
}

skel:addEffect("targetmod", {
  residue_func = function(self, player, skill, scope)
    if player.kingdom == "jin" and skill.trueName == "slash_skill" and scope == Player.HistoryPhase then
      return #table.filter(Fk:currentRoom().alive_players, function (p)
        return p:hasSkill(skel.name)
      end)
    end
  end,
  bypass_distances = function(self, player, skill, card, to)
    return skill.trueName == "slash_skill" and (player:hasSkill(skel.name) or (player.kingdom == "jin" and to:hasSkill(skel.name)))
  end,
})

return skel